#include<iostream>
#include<algorithm>

using namespace std;

const int N=2e5+10;

long long n,m,k;
long long a[N];

bool cmp(int x,int y)
{
	return x>y;
}

int main()
{
	scanf("%d%d%d",&n,&m,&k);
	for(int i=0;i<n;i++) scanf("%d",&a[i]);
	
	sort(a,a+n,cmp);
	
	int times=m/(k+1),t=m%(k+1);
	
	printf("%lld\n",(a[0]*k+a[1])*times+a[0]*t);
	return 0;
}
